package org.javaboy.demo.service;

import org.javaboy.demo.dao.UserDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Repository
public class UserService2 {

    @Autowired
    UserDao userDao;

    @Transactional
    public void update2() {
        userDao.addMoney("zhangsan", 100.0);
//        int i = 1 / 0;
    }
}
